import http from "@/utils/fetch";

// 平台文章列表
export function getArticleList(params) {
  return http.post("/Admin/PlatformArticle/platformArticleList", params);
}
// 添加或编辑平台文章
export function addArticle(params) {
  return http.post("Admin/PlatformArticle/addOrEditPlatformArticle", params, true);
}
// 根据id查询平台文章
export function searchArticle(id) {
  return http.get("Admin/PlatformArticle/platformArticleById", { id: id });
}
// 获取二级分类
export function searchSecondCategory(id) {
  return http.get("Admin/PlatformArticle/secondCategory", { id: id });
}
// 根据id删除平台文章
export function delArticle(id) {
  return http.post("/Admin/PlatformArticle/delPlatformArticle", { id: id }, true);
}
// 根据id编辑首页推荐
export function editHome(params) {
  return http.post("/Admin/PlatformArticle/editHomeRecommend", params, true);
}
// 根据id编辑热门推荐
export function editHot(params) {
  return http.post("/Admin/PlatformArticle/editHotRecommend", params, true);
}
// 根据id编辑文章信息状态
export function editStatus(params) {
  return http.post("/Admin/PlatformArticle/editArticleStatus", params, true);
}
